<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>

<html>
	<head>
		<title>山西海宁皮革城</title>
		<%@ include file="/commons/meta.jsp"%>
		<script type="text/javascript">

		$(document).ready(function(){
			/* setup navigation, content boxes, etc... */
			Administry.setup();
			// validate signup form on keyup and submit
			var validator = $("#loginform").validate({
				rules: {
					userid: "required",
					password: "required"
				},
				messages: {
					userid: "请输入账号",
					password: "请输入密码"
				},
				// the errorPlacement has to take the layout into account
				errorPlacement: function(error, element) {
					error.insertAfter(element.parent().find('label:first'));
				},
				// set new class to error-labels to indicate valid fields
				success: function(label) {
					// set &nbsp; as text for IE
					label.html("&nbsp;").addClass("ok");
				}
			});
		
		});
		</script>
	</head>

	<body>
		<%@ include file="/commons/loginHeader.jsp"%>
		<!-- Page content -->
		<div id="page">
			<!-- Wrapper -->
			<div class="wrapper-login">
				<!-- Login form -->
				<section class="full">
				<h3>登陆</h3>

				<div class="box box-info">输入账号密码进行登陆</div>
				<!-- 登录错误信息 -->
				<s:if test="#request.login_error_info != null">
					<div class="box box-error"><s:property value="#request.login_error_info" /></div>
				</s:if>
				
				<!-- 成功信息 -->
				<s:if test="#request.login_success_info != null">
					<div class="box box-success"><s:property value="#request.login_success_info" /></div>
				</s:if>
				
				<form id="loginform" method="post" action="loginOpt!login.do">
					<p>
						<label class="required" for="userid">账号:</label>
						<br />
						<input type="text" id="userid" class="full" value=""	name="userid" />
					</p>
					<p>
						<label class="required" for="password">密码:</label>
						<br />
						<input type="password" id="password" class="full" value=""	name="password" />
					</p>
					<p>
						<input type="submit" class="btn btn-green big" value="Login" />
						&nbsp;
						<a href="javascript: //;"
							onClick="$('#forget').slideDown(); return false;">忘记密码？</a> or
						<a href="javascript: //;"	
							onClick="$('#help').slideDown(); return false;">注册账号？</a>
					</p>
					<div class="clear">
						&nbsp;
					</div>
				</form>
				<div id="forget" class="box box-info" style="display: none">
					如忘记密码，请联系管理员进行密码重置。
					<a href="javascript: //;"
						onClick="$('#forget').slideUp(); return false;">收起</a>
				</div>
				<div id="help" class="box box-info" style="display: none">
					如需登陆系统，请联系管理员分配账号。
					<a href="javascript: //;"
						onClick="$('#help').slideUp(); return false;">收起</a>
				</div>
				</section>
				<!-- End of login form -->

			</div>
			<!-- End of Wrapper -->
		</div>
		<!-- End of Page content -->
		<%@ include file="/commons/footer.jsp"%>
	</body>
</html>
